#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int main() {
	int n = 0;
	cin >> n;
	if (n > 4) {
		n = n + 3 - 7;
	}
	else n += 3;
	switch (n) {
	case 1:
			cout << "Monday" << endl;
			break;
	case 2:
		cout << "Tuesday" << endl;
		break;

	case 3:
		cout << "Wednesday" << endl;
		break;

	case 4:
		cout << "Thursday" << endl;
		break;
	case 5:
		cout << "Friday" << endl;
		break;
	case 6:
		cout << "Saturday" << endl;
		break;
	case 7:
		cout << "Sunday" << endl;
		break;
	}
	return 0;
}